package model.micro.fieldunitabilities
{
	import model.micro.FieldUnit;
	import model.micro.FieldUnitEffect;
	
	/**
	 */
	public class Charge extends FieldUnitAbility
	{
		
		public function Charge(unit:FieldUnit)
		{
			super(unit)
		}
		
		override public function activate():void
		{
			super.activate();
			
			var active_effects:Vector.<FieldUnitEffect> = unit.activeEffects;
			
			for each (var effect:FieldUnitEffect in active_effects)
			{
				if (effect is ChargeEffect)
				{
					return;
				}
			}
			// else
			active_effects.push(new ChargeEffect(unit));
		}
	}

}